package com.example.demo.service.Imp;
import com.example.demo.dao.RoleMapper1;
import com.example.demo.model.Role1;
import com.example.demo.service.RoleService1;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 编写者：施皓
 * 编写时间：
 */

@Service
public class RoleServiceImp1 implements RoleService1 {
    @Autowired
   private RoleMapper1 roleMapper;

    @Override
    public Role1 selectByPrimaryKey(Integer rid){

        return roleMapper.selectByPrimaryKey(rid);
    }

    @Override
    public List<Role1> getIsBegin() {
        System.out.println("执行角色类型SQL语句");
        return roleMapper.getIsBegin();
    }

    @Override
    public List<Role1> getAll() {
        return roleMapper.getAll();
    }

    @Override
    public int delRole(Integer rid) {
        return roleMapper.delRole(rid);
    }

    @Override
    public int insertRole(Role1 rolemodel) {
        return roleMapper.insertRole(rolemodel);
    }

    @Override
    public int updateRole(Role1 rolemodel) {
        return roleMapper.updateRole(rolemodel);
    }
}
